1. Field of the Invention
The present invention relates to an information processing apparatus, such as a personal computer or a digital multi-function peripheral, a method for controlling the information processing apparatus, and a recording medium.
2. Description of the Related Art
In recent years, as the awareness of the global environment increases, there is a higher demand for energy-saving information processing apparatuses, such as a personal computer and a digital multi-function peripheral. To help save energy, there are an increasing number of cases in which a function called “hibernation” is provided in information processing apparatuses in order to reduce power consumption in a waiting state. Hibernation is a technique in which an information processing apparatus that is operating saves, in a non-volatile storage apparatus such as a hard disk drive (HDD), the content (hereinafter, referred to as “images”) in a main storage memory (RAM) before power supply is stopped, and restores the images in the RAM when power is again supplied to the apparatus. In the information processing apparatus that is in a power saving state (hibernation state), since power supply to most of the components in the apparatus including the RAM is stopped, power consumption is greatly suppressed. Moreover, at the time of restoration from the hibernation state, it is possible to reconstruct a state that does not feel any different to a user compared to before switching to the hibernation state, and thus hibernation is an extremely useful technique. Hibernation is widely utilized in personal computers and digital multi-function peripherals. For example, such an apparatus stops the power supply by itself if a specified time elapses in which the user does not perform any operation, and an operation performed on a keyboard or an operation panel by the user triggers the power supply again, so that the apparatus is restored to the state before the power supply was stopped.
Further, in recent years, as information processing apparatuses are provided with greater functionality, the time necessary for the information processing apparatuses to start up is becoming longer, and accordingly hibernation is used more often as a technique to cope with this. For example, an information processing apparatus saves the content of the RAM in an active state in a non-volatile storage apparatus, and expands the content to the RAM when starting up, thus shortening the startup time.
However, with the conventional hibernation technique, the execution of programs is not resumed until all the images created in the non-volatile storage apparatus have been expanded to the RAM, and restoring processing is complete, and consequently a problem occurs that the waiting time for the user is longer as the size of the images to be created is greater. Although one countermeasure to this problem is the acceleration of the transfer rate when transferring images to the RAM from the non-volatile storage apparatus used as a saving destination, such as a hard disk or a flash memory, there is a physical limit to the acceleration of the transfer rate, and thus it is not easy to realize this.
In addition, many of the information processing apparatuses in recent years adopt a multitask operating system (multitask OS), and simultaneously execute many processes. There are some processes to be executed that, even in the case of being restored from the hibernation state, need to be reinitialized or re-set after restoration due to constraints of related hardware and the like. It is desirable to resume the operation of such processes as quickly as possible after restoration. Further, it is desirable to quickly resume the operation of a process that greatly influences the startup time that the user feels, such as a process related to an input apparatus or a display apparatus.
In view of this, to address the problems described above, a technique has been proposed in which, before all the images are expanded to the RAM at the time of restoration from the hibernation state, the execution of a program is resumed when some of the images has been expanded. For example, in Japanese Patent Laid-Open No. 2007-334383, an information processing apparatus is proposed in which the execution of a program is resumed in parallel with the transfer of images to the RAM in the background, and if it is detected that a memory region to which an image has not been transferred is accessed by the resumed program, an image corresponding to that memory region is immediately obtained.
However, the above conventional technique has the following problems. An example of such problems is that in restoring processing for restoration from the hibernation state, if a process that has resumed its operation is a program that makes many memory accesses immediately after resumption, transfer processing with respect to a memory region to which an image has not been transferred is frequently performed. In this case, most of the actual time is spent on image transfer processing, which makes the time period for which the execution of a program is actually stopped longer. As a result, the user operating the information processing apparatus will have an impression that the operation of the apparatus is extremely slow. Particularly, in the information processing apparatus that adopts a multitask OS, since a plurality of processes respectively operate in an independent manner, and each of the processes simultaneously accesses a different memory region, the problem described above tends to occur. As described above, if image transfer processing based on a memory access made by the processes is frequently performed, the effect of shortening the waiting time for the user is diminished due to the resumption of process execution in parallel with transfer processing.